package com.globallogic.training.javase.university;

import org.apache.commons.lang.StringUtils;

import com.globallogic.training.javase.university.subject.Curriculum;

public class Speciality {
	
	private String specName;
	private Curriculum curriculum;
	
	/**
	 * @param specName Speciality name cannot be null or blank
	 */
	public Speciality (String specName) {
		
		if (specName == null) {
			throw new IllegalArgumentException("Speciality Name is null");
		}
		
		if (StringUtils.isBlank(specName)) {
			throw new IllegalArgumentException("Speciality Name is blank");
		}
		
		this.specName = specName;
	}
	
	public void setCurriculum(Curriculum cur) {
		this.curriculum = cur;
	}
	
	public Curriculum getCurriculum() {
		return curriculum;
	}
	
	public String getName() {
		return specName;
	}

}
